﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
using DAL;
namespace BLL
{
    public class BLL_CMS_Keyword
    {
        //查询所有的热评关键字数据以及条件查询评论
        //分页查询                                                 当前页数     每页几条     关键字
        public static Pager<CMS_Keyword> GetCMS_Keyword(int PageIndex, int PageSize, string keyword)
        {
            return DAL_CMS_Keyword.GetCMS_Keyword(PageIndex, PageSize, keyword); 
        }
        /// <summary>
        /// 添加关键字
        /// </summary>
        /// <param name="cm"></param>
        /// <returns></returns>
        public static int AddCMS_Keyword(CMS_Keyword kd)
        {
            return DAL_CMS_Keyword.AddCMS_Keyword(kd);
        }
        /// <summary>
        /// 根据id删除关键字
        /// </summary>
        /// <param name="kid"></param>
        /// <returns></returns>
        public static int DeleteID(int kid)
        {
            return DAL_CMS_Keyword.DeleteID(kid);
        }

        /// <summary>
        /// 根据cmid查询数据 
        /// </summary>
        /// <param name="kid"></param>
        /// <returns></returns>
        public static CMS_Keyword SelectID(int kid)
        {
            return DAL_CMS_Keyword.SelectID(kid);
        }

        /// <summary>
        /// 根据传来的对象进行修改
        /// </summary>
        /// <param name="kd"></param>
        /// <returns></returns>
        public static int UpdateCMS_Keyword(CMS_Keyword kd)
        {
            return DAL_CMS_Keyword.UpdateCMS_Keyword(kd);
        }

        /// <summary>
        /// 查询所有的热评关键字
        /// </summary>
        /// <returns></returns>
        public static List<CMS_Keyword> SelectKeywords()
        {
            return DAL_CMS_Keyword.SelectKeywords();
        }
    }
}
